home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / util / rexx / rmh.lha / RMH / Examples / pconfig.rexx < prev    next >
OS/2 REXX Batch file  |  2001-05-24  |  402b  |  18 lines

  1. /*
  2. usage of ParseConfig()
  3. */
  4.  
  5. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  6.  
  7. file=AddPart(PathPart(ProgramName("FULL")),ProgramName("NOEXT"))".conf"
  8.  
  9. lines=ParseConfig(file,"CONF")
  10. if lines==-1 then do
  11.     say "File '"file"' not found."
  12.     exit
  13. end
  14.  
  15. do i=0 to lines-1
  16.     say left("Real line:" i,14) left("line:" conf.i.line,9) left("Option:" conf.i,25) "Value:" conf.i.value
  17. end
  18.